//
//  LRXOtherWayLogin.m
//  路人侠
//
//  Created by zhangxulong on 2/19/16.
//  Copyright © 2016 zhangxulong. All rights reserved.
//

#import "LRXOtherWayLogin.h"

@interface LRXOtherWayLogin()
@end

@implementation LRXOtherWayLogin

- (instancetype)initSubViews
{
    if (self = [super init]) {
        self.backgroundColor = [UIColor colorWithRed:240.0 green:240.0 blue:240.0];
        //找回密码 按钮的样式的设置
        UIButton * findPassBtn = [UIButton buttonWithType:UIButtonTypeSystem];
        [findPassBtn setTitle:@"找回密码" forState:UIControlStateNormal];
        [findPassBtn setTitleColor:[UIColor colorWithRed:0 green:187.0 blue:209.0 ] forState:UIControlStateNormal];
        findPassBtn.backgroundColor = [UIColor clearColor];
        findPassBtn.frame = CGRectMake(0, 0, 0, 28 * hScale);
        [findPassBtn sizeToFit];
        CGPoint findPassBtnCenter =  CGPointMake(320 * wScale, 26 * hScale);
        findPassBtn.center = findPassBtnCenter;
        
        
        //其他 的按钮的样式
        UIButton * otherBtn = [UIButton buttonWithType:UIButtonTypeSystem];
        otherBtn.frame = CGRectMake(0, 0, 64* wScale, 64 * wScale);
        otherBtn.layer.cornerRadius = 30 * wScale;
        CGPoint otherBtnCenter = CGPointMake(320 * wScale, 90 * hScale);
        otherBtn.center = otherBtnCenter;
        otherBtn.layer.borderColor = [UIColor colorWithRed:219.0 green:219.0 blue:219.0 ].CGColor;
        otherBtn.layer.borderWidth = 2 * hScale;
        otherBtn.titleLabel.font = [UIFont systemFontOfSize:24 * hScale];
        [otherBtn setTitleColor:[UIColor colorWithRed:0 green:187.0 blue:209.0 ] forState:UIControlStateNormal];
        [otherBtn setTitle:@"其他" forState:UIControlStateNormal];
        otherBtn.titleLabel.font = [UIFont systemFontOfSize:24 * hScale];
        
        
        
        //其他方式 登陆 按钮样式
        UIButton * other1 = [UIButton buttonWithType:UIButtonTypeSystem];
        UIButton * other2 = [UIButton buttonWithType:UIButtonTypeSystem];
        UIButton * other3 = [UIButton buttonWithType:UIButtonTypeSystem];
        CGFloat otherBtnY = otherBtn.frame.origin.y + otherBtn.frame.size.height + 24 * hScale;
        CGFloat otherBtnR = 72 * wScale;
        
        other1.frame = CGRectMake(126 * wScale, otherBtnY,otherBtnR ,otherBtnR);
        other2.frame = CGRectMake(292 * wScale, otherBtnY,otherBtnR ,otherBtnR);
        other3.frame = CGRectMake(458 * wScale, otherBtnY,otherBtnR ,otherBtnR);
        
        other1.layer.cornerRadius = 36 * wScale;
        other2.layer.cornerRadius = 36 * wScale;
        other3.layer.cornerRadius = 36 * wScale;
        
        other1.backgroundColor = orangeColor;
        other2.backgroundColor = [UIColor redColor];
        other3.backgroundColor = [UIColor purpleColor];
        
        
        [self addSubview:other1];
        [self addSubview:other2];
        [self addSubview:other3];
        [self addSubview:otherBtn];
        [self addSubview:findPassBtn];
    }
    
    return self;
}

+ (instancetype)layoutOtherWaySubviews{
    
    return [[LRXOtherWayLogin alloc]initSubViews];
}
@end
